package com.googlecode.cnasort.cc.rmi.server.ihm;

import java.awt.BorderLayout;
import java.awt.EventQueue;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import java.net.SocketException;

public class ServerJFrame extends JFrame
{
    private static final long serialVersionUID = 1L;
    private JPanel contentPane;
    private ServerJPanel serverJPanel;

    /**
     * Launch the application.
     */
    public static void main(String[] args) {
        EventQueue.invokeLater(new Runnable() {
            @Override
            public void run() {
                try {
                    ServerJFrame frame = new ServerJFrame();
                    frame.setVisible(true);
                } catch (Exception e) {
                    e.printStackTrace();
                }
            }
        });
    }

    /**
     * Create the frame.
     * @throws SocketException
     */
    public ServerJFrame() throws SocketException
    {
        setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        setBounds(100, 100, 550, 300);
        contentPane = new JPanel();
        contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
        contentPane.setLayout(new BorderLayout(0, 0));
        setContentPane(contentPane);

        ServerCommand serverCommand = new ServerCommand();

        this.serverJPanel = new ServerJPanel( serverCommand );
        contentPane.add( serverJPanel );
    }

}
